package com.hjw.rabbitmq.springbootorderrabbitmqproducer.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
public class DeadRabbitMqConfiguration {
    @Bean
    public DirectExchange deadDirectExchange(){return new DirectExchange("dead_direct_exchange",true,false);}

    @Bean
    public Queue dirctdeadQueue(){

        return new Queue("dead_direct_queue",true);}



    @Bean
    public Binding directdeadBinding(){
        return  BindingBuilder.bind(dirctdeadQueue()).to(deadDirectExchange()).with("dead");
    }


}
